<?php
@session_start();
//require '../execute/auth.php';
require_once('../../inc/config.inc');

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {
	die('Failed to connect to server: ' . mysql_error());
}

//Select database
$db = mysql_select_db(DB_DATABASE);
if(!$db) {
	die("Unable to select database");
}
$id=$_SESSION['SESS_USER_ID'];
$q= mysql_query("SELECT * FROM users WHERE id=$id");
$pro = mysql_fetch_array($q);


?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
	href="../../assets/css/jasny-bootstrap/bootstrap.css" type="text/css" />
<link rel="stylesheet"
	href="../../assets/css/jasny-bootstrap/bootstrap.min.css"
	type="text/css" />
<link rel="stylesheet"
	href="../../assets/css/jasny-bootstrap/bootstrap-responsive.css"
	type="text/css" />
<link rel="stylesheet"
	href="../../assets/css/jasny-bootstrap/bootstrap-responsive.min.css"
	type="text/css" />

<!--  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.0/css/jasny-bootstrap.min.css"> -->

<link rel="stylesheet" href="../../assets/css/profile.css"
	type="text/css" />
<link href='../../assets/favicon-6c3a39685626012e7563512c4da1ad9a.ico'
	rel='shortcut icon' />
<link rel="stylesheet" href="../../assets/css/bootstrap.css"
	type="text/css" />
<link rel="stylesheet" href="../../assets/css/bootstrap-responsive.css"
	type="text/css" />
<link rel="stylesheet" href="../../assets/css/font-awesome.css"
	type="text/css" />

<!-- Latest compiled and minified CSS -->

</head>

<body>
	<div class="container">

		<div class="row-fluid">
			<div class="span12">

				<div class="row-fluid" style="margin-top: 20px">
					<div class="navbar navbar-inverse navbar-fixed-top">
						<div class="navbar-inner" style="border-radius: 0">
							<div class="container-fluid">
								<a class="btn btn-navbar" data-toggle="collapse"
									data-target=".nav-collapse"> <span class="icon-bar"></span> <span
									class="icon-bar"></span> <span class="icon-bar"></span> </a> <a
									class="brand" href="index.php">TECHWORKS</a>
								<div class="nav-collapse collapse">

									<ul class="nav">
										<li><a href="plan.php"><i class="fa fa-book"></i>&nbsp;Plans</a>
										</li>
										<li><a href="services.php"><i class="icon-signal"></i>&nbsp;Services</a>
										</li>
										<!--<li><a href="#"><i class="icon-question-sign icon-white"></i>&nbsp;Learning</a></li>-->
									</ul>
									<ul class="nav pull-right">
									<?php
									if (isset ( $_SESSION ['SESS_USER_ID'] ) || (@trim ( $_SESSION ['SESS_USER_ID'] ) != '')) {
											
										?>
										<li class="dropdown active"><a class="dropdown-toggle"
											href="#" data-toggle="dropdown"><i class=" icon-unlock"></i>&nbsp;Logged
												in as: <?php echo $_SESSION['SESS_MEMBER_EMAIL']; ?> <strong
												class="caret"></strong> </a>
											<ul class="dropdown-menu">
												<li><a href="users/<?php echo $pro['role']; ?>/index.php"><i
														class="icon-edit"></i>&nbsp;My Account</a></li>
												<li><a href="#"><i class="icon-cog"></i>&nbsp;Account
														Settings</a></li>
												<li class="divider"></li>
												<li><a href="execute/logout.php"><i class="icon-signout"></i>&nbsp;Quit</a>
												</li>
											</ul></li>
											<?php
									} else {
										?>

										<li class="divider-vertical"></li>
										<li class="dropdown"><a class="dropdown-toggle" href="#"
											data-toggle="dropdown"><i class=" icon-user icon-white"></i>&nbsp;Sign
												In <strong class="caret"></strong> </a>
											<div class="dropdown-menu"
												style="padding: 15px; padding-bottom: 0px;">
												<form method="post" action="execute/login.php"
													accept-charset="UTF-8" id="loginid" data-validate="parsley">
													<input style="margin-bottom: 15px;" type="text"
														placeholder="Username" id="username" name="secname"
														data-required="true"> <input style="margin-bottom: 15px;"
														type="password" placeholder="Password" id="password"
														name="secpass" data-required="true"> <input
														class="btn btn-success btn-block" type="submit"
														id="sign-in" value="Sign In"
														onclick="javascript:$('#loginid').parsley( 'validate' );">
													<!--<label style="text-align:center;margin-top:5px">or</label>
                                <input class="btn btn-primary btn-block" type="button" id="sign-in-google" value="Sign In with Google">
								<input class="btn btn-primary btn-block" type="button" id="sign-in-twitter" value="Sign In with Twitter">-->
												</form>
											</div></li>
											<?php
									}
									?>

									</ul>
								</div>
								<!--/.nav-collapse -->
							</div>
							<!--/.container-fluid -->
						</div>
						<!--/.navbar-inner -->
					</div>
					<!--/.navbar -->




				</div>
				<!--/row-->


			</div>
			<!--/span-->
		</div>
		<!--/row-->